home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / SOUND.SWG / 0026_VARS for CDRom Player.pas < prev    next >
Pascal/Delphi Source File  |  1993-08-27  |  3KB  |  156 lines

  1. { NICHOLAS KIRSCH }
  2.  
  3. Unit CD_Vars;
  4.  
  5. Interface
  6.  
  7. Type
  8.   ListBuf = Record
  9.     UnitCode : Byte;
  10.     UnitSeg,
  11.     UnitOfs  : Word;
  12.   end;
  13.  
  14.   VTOCArray      = Array [1..2048] of Byte;
  15.   DriveByteArray = Array [1..128] of Byte;
  16.  
  17.   Req_Hdr = Record
  18.     Len     : Byte;
  19.     SubUnit : Byte;
  20.     Command : Byte;
  21.     Status  : Word;
  22.     Reserved: Array [1..8] of Byte;
  23.   End;
  24.  
  25. Const
  26.   Init        = 0;
  27.   IoCtlInput  = 3;
  28.   InputFlush  = 7;
  29.   IOCtlOutput = 12;
  30.   DevOpen     = 13;
  31.   DevClose    = 14;
  32.   ReadLong    = 128;
  33.   ReadLongP   = 130;
  34.   SeekCmd     = 131;
  35.   PlayCD      = 132;
  36.   StopPlay    = 133;
  37.   ResumePlay  = 136;
  38.  
  39. Type
  40.  
  41.   Audio_Play = Record
  42.     APReq    : Req_Hdr;
  43.     AddrMode : Byte;
  44.     Start    : LongInt;
  45.     NumSecs  : LongInt;
  46.   end;
  47.  
  48.   IOControlBlock = Record
  49.     IOReq_Hdr  : Req_Hdr;
  50.     MediaDesc  : Byte;
  51.     TransAddr  : Pointer;
  52.     NumBytes   : Word;
  53.     StartSec   : Word;
  54.     ReqVol     : Pointer;
  55.     TransBlock : Array [1..130] OF Byte;
  56.   End;
  57.  
  58.   ReadControl = Record
  59.     IOReq_Hdr : Req_Hdr;
  60.     AddrMode  : Byte;
  61.     TransAddr : Pointer;
  62.     NumSecs   : Word;
  63.     StartSec  : LongInt;
  64.     ReadMode  : Byte;
  65.     IL_Size,
  66.     IL_Skip   : Byte;
  67.   End;
  68.  
  69.   AudioDiskInfoRec = Record
  70.     LowestTrack  : Byte;
  71.     HighestTrack : Byte;
  72.     LeadOutTrack : LongInt;
  73.   End;
  74.  
  75.   PAudioTrackInfo   = ^AudioTrackInfoRec;
  76.   AudioTrackInfoRec = Record
  77.     Track        : Integer;
  78.     StartPoint   : LongInt;
  79.     EndPoint     : LongInt;
  80.     Frames,
  81.     Seconds,
  82.     Minutes,
  83.     PlayMin,
  84.     PlaySec,
  85.     TrackControl : Byte;
  86.   end;
  87.  
  88.   MSCDEX_Ver_Rec = Record
  89.     Major,
  90.     Minor : Integer;
  91.   End;
  92.  
  93.   DirBufRec    = Record
  94.     XAR_Len   : Byte;
  95.     FileStart : LongInt;
  96.     BlockSize : Integer;
  97.     FileLen   : LongInt;
  98.     DT        : Byte;
  99.     Flags     : Byte;
  100.     InterSize : Byte;
  101.     InterSkip : Byte;
  102.     VSSN      : Integer;
  103.     NameLen   : Byte;
  104.     NameArray : Array [1..38] of Char;
  105.     FileVer   : Integer;
  106.     SysUseLen : Byte;
  107.     SysUseData: Array [1..220] of Byte;
  108.     FileName  : String[38];
  109.   end;
  110.  
  111.   Q_Channel_Rec = Record
  112.     Control  : Byte;
  113.     Track    : Byte;
  114.     Index    : Byte;
  115.     Minutes  : Byte;
  116.     Seconds  : Byte;
  117.     Frame    : Byte;
  118.     Zero     : Byte;
  119.     AMinutes : Byte;
  120.     ASeconds : Byte;
  121.     AFrame   : Byte;
  122.   End;
  123.  
  124. Var
  125.   AudioChannel   : Array [1..9] of Byte;
  126.   RedBook,
  127.   Audio,
  128.   DoorOpen,
  129.   DoorLocked,
  130.   AudioManip,
  131.   DiscInDrive    : Boolean;
  132.   AudioDiskInfo  : AudioDiskInfoRec;
  133.   DriverList     : Array [1..26] of ListBuf;
  134.   NumberOfCD     : Integer;
  135.   FirstCD        : Integer;
  136.   UnitList       : Array [1..26] of Byte;
  137.   MSCDEX_Version : MSCDEX_Ver_Rec;
  138.   QChannelInfo   : Q_Channel_Rec;
  139.   Busy,
  140.   Playing,
  141.   Paused         : Boolean;
  142.   Last_Start,
  143.   Last_End       : LongInt;
  144.   DirBuf         : DirBufRec;
  145.  
  146. Implementation
  147.  
  148. Begin
  149.   FillChar(DriverList, SizeOf(DriverList), #0);
  150.   FillChar(UnitList, SizeOf(UnitList), #0);
  151.   NumberOfCD := 0;
  152.   FirstCD    := 0;
  153.   MSCDEX_Version.Major := 0;
  154.   MSCDEX_Version.Minor := 0;
  155. end.
  156.